package functions

import (
	"fmt"
	"regexp"
)

func isInt(str string) bool {
	return regexp.MustCompile(`^\d+$`).MatchString(str)
}

func isFloat(str string) bool {
	return regexp.MustCompile(`^\d+[.]\d+$`).MatchString(str)
}

func isBool(str string) bool {
	return str == "true" || str == "false"
}

func throwException(format string, msgs ...interface{}) {
	panic(fmt.Sprintf(format, msgs...))
}
